<%= stylesheet_link_tag  "compromiso_registrar", :type=> "text/css" %>

<script type="text/javascript"  src="/assets/js/jscal2.js"></script>
<script type="text/javascript"  src="/assets/js/lang/es.js"></script>

<link rel="stylesheet" type="text/css" href= "/assets/css/jscal2.css" />
<link rel="stylesheet" type="text/css" href= "/assets/css/border-radius.css" />
<link rel="stylesheet" type="text/css" href= "/assets/css/steel/steel.css" />

<!--Sino existen reuniones-->

<% if @reuniones.empty? %>

<table width="672" border="0">
  <form id="form1" name="form1" method="get" action="/reunion_registrar/reunion_registrar">
    <tr>
      <td align="center" valign="top"><br/><br/>No existen reuniones futuras para revisar un nuevo compromiso<br/><br/></td>
    </tr>
    <tr valign="bottom" class="Contenido">
      <td align="center">
        <br/><br/><input name="crear_reunion" type="submit"  class="botonSombraRegistroReunion"  value="Registrar Reunion Ahora" />
      </td>
    </tr>
  </form>
</table>

<!--Si Existen Reuniones para asociar el compromiso a una-->

<%else%>

<form id="form1" name="form1" method="get" action="/compromiso_registrar/resultado_compromiso_registrar">
  <br/>
  <div align="center" class="Estilo3">Registrar Compromiso </div>
  <br/>
  <center>
    <table width="672"  border="0">
      <tr>
        <th colspan="2" align="left" scope="row">
          <h3>
            <span class="Estilo2">Indique los datos para crear el nuevo compromiso: </span><br />
          </h3>
        </th>
      </tr>
      <tr>
        <th colspan="2" scope="row">&nbsp;</th>
      </tr>
      <tr>
        <th width="210" align="right" scope="row"><label><span class="Estilo1">Nombre:</span></label></th>
        <td width="462"><input  name="nombre_texto" id="nombre_texto" class="CajaTexto" type="text" size="65" maxlength="100" /></td>
      </tr>
      <tr>
        <th colspan="2" scope="row">&nbsp;</th>
      </tr>
      <tr>
        <th colspan="3" align="left" scope="row">
          <table width="630" border="0">
            <tr>
              <th colspan="2" align="left" scope="row"><span class="Estilo1">Fecha límite de cumplimiento:</span></th>
              <td  width="422" valign="middle"><input class="CajaTexto" name="fecha_pactada" readonly="true" size="30" id="f_date1" />
                <button id="f_btn1" alt="Insertar Fecha" title="Insertar Fecha">
                  <img src="http://cdn1.iconfinder.com/data/icons/fugue/bonus/icons-shadowless-24/calendar-month.png" width="24" height="24" />
                </button>
                <script type="text/javascript">//<![CDATA[
                              Calendar.setup({
                                inputField : "f_date1",
                                trigger    : "f_btn1",
                                onSelect   : function() { this.hide() },
                                showTime   : 12,
                                dateFormat : "%Y-%m-%d %I:%M %p"
                              });
                              //]]>
                </script>
              </td>
            </tr>
            <tr>
              <th colspan="2" scope="row">&nbsp;</th>
            </tr>
          </table>
        </th>
      </tr>
      <tr>
        <th align="right" valign="top" scope="row">
          <label class="Estilo1"><center><img src="http://cdn1.iconfinder.com/data/icons/woothemes/PNG/comment_write.png" width="128" height="128" alt="Descripcion o Comentarios del Compromiso" title="Descripcion o Comentarios del Compromiso"/></center> </label>
        </th>
        <td>
          <label>
            <textarea name="descripcion_texto" class="CajaTexto" id="textarea" cols="65" rows="8" maxlength="1000"></textarea>
          </label>
        </td>
      </tr>
      <tr>
        <th colspan="2" scope="row">&nbsp;</th>
      </tr>
      <tr>
        <th colspan="2" align="left" valign="top" scope="row">
          <table width="624" border="0">
            <tr>
              <th colspan="2" align="left" scope="row"><span class="Estilo1">Reuni&oacute;n de revisi&oacute;n de compromiso:</span></th>
              <td width="270" nowrap="nowrap">
                <select name="id_reunion" id="id_reunion" class="DynarchCalendar-hover-week">

  <% @reuniones.each do |reunion| %>

                  <option value="<%= reunion.id %>"><%=  reunion.nombre + "-->" + reunion.fecha.asctime %></option>
                             
  <% end %>

                </select>
              </td>
            </tr>
            <tr>
              <th colspan="2" scope="row">&nbsp;</th>
            </tr>
          </table>
        </th>
      </tr>
      <tr>
        <td colspan="2" align="center" scope="row">
          <table width="274" border="0">
            <tr>
              <th width="120" scope="row">
                <input name="Submit_Crear" type="submit" class="botonSombraCompromiso" value="Crear Compromiso" />
              </th>
              <td width="100">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
              <th width="66" scope="row">
                <input name="Submit_Limpiar" type="reset" class="botonSombraCompromiso" value="Limpiar Campos" />
              </th>
            </tr>
          </table></center>
        </td>
      </tr>
    </table>
  </form>
<%end%>